package com.partner.share.work.web.admin.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.partner.share.work.web.admin.dao.UserDao;
import com.partner.share.work.web.admin.entity.User;
import com.partner.share.work.web.admin.service.UserService;
import org.springframework.stereotype.Service;

/**
 * @author pengyangyan
 * @version 1.0.0
 * @date 2019年09月19日 09:49:00
 */
@Service
public class UserServiceImpl extends ServiceImpl<UserDao, User> implements UserService {
    @Override
    public User getUserByEmail(String email) {
        QueryWrapper<User> queryWrapper = new QueryWrapper<>();
        queryWrapper.lambda().eq(User::getEmail,email);
        return this.baseMapper.selectOne(queryWrapper);
    }
}
